import request from '@/utils/request'

// 创建收货单明细
export function createReceiveOrderDetail(data) {
  return request({
    url: '/hs/receive-order-detail/create',
    method: 'post',
    data: data
  })
}

// 更新收货单明细
export function updateReceiveOrderDetail(data) {
  return request({
    url: '/hs/receive-order-detail/update',
    method: 'put',
    data: data
  })
}

// 删除收货单明细
export function deleteReceiveOrderDetail(id) {
  return request({
    url: '/hs/receive-order-detail/delete?id=' + id,
    method: 'delete'
  })
}

// 获得收货单明细
export function getReceiveOrderDetail(id) {
  return request({
    url: '/hs/receive-order-detail/get?id=' + id,
    method: 'get'
  })
}

// 获得收货单明细分页
export function getReceiveOrderDetailPage(params) {
  return request({
    url: '/hs/receive-order-detail/page',
    method: 'get',
    params
  })
}
// 导出收货单明细 Excel
export function exportReceiveOrderDetailExcel(params) {
  return request({
    url: '/hs/receive-order-detail/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}